<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../utils/flexible.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        ul,
        li {
            list-style: none;
        }

        a {
            text-decoration: none;
        }

        img {
            display: block;
        }

        body {
            width: 10rem;
        }

        .header {
            width: 10rem;
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: 1.87rem;
            background: #ff841d;
        }

        .header a {
            font-size: 0.7rem;
            color: #fff;
        }

        .header p {
            font: 0.6rem/1rem "";
            color: #fff;
            padding-left: 0.2rem;
        }

        .header span img {
            width: 1.1rem;
            height: 1.1rem;
            padding-left: 0.27rem;
        }

        .container-1 {
            padding-top: 0.5rem;
            padding-left: .5rem;
            padding-right: .5rem;
        }
        .container-1 span {
            font: 0.37rem/0.48rem "";
        }
        .container-1 b img{
            padding-left: 2.29rem;
        }
        .container-1 h3{
            font-size: 20px;
        }
        #footer button {
            height: 0.85rem;
            width: 9.6rem;
            margin-left: 0.2rem;
            margin-top: 0.3rem;
            border: none;
            box-shadow: 0.03rem 0.03rem 0.1rem #666;
            color: #f89a20;
            font-weight: 600;
        }

        #footer .brand {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 0.91rem;
            background: #ff9000;
            text-align: center;
            margin-top: 0.13rem;
        }

        #footer .brand span {
            background: #ff9000;
            color: #fff;
            margin-left: 0.6rem;
            font-size: 0.6rem;
        }

        #footer .brand a img {
            height: 0.5rem;
            width: 0.5rem;
            margin-right: 0.2rem;
        }

        #login {
            text-align: center;
            display: flex;
            flex-direction: column;
            background: #f4f4f4;
        }

        #login .container {
            display: flex;
            justify-content: space-between;
            margin-top: 0.13rem;
        }

        #login .container a {
            width: 33%;
            color: #666;
            border: 0.03rem solid #ccc;
            text-align: center;
            font-size: 0.4rem;
        }

        #login p {
            margin-top: 0.27rem;
        }

        #login span {
            margin-top: 0.17rem;
        }
    </style>
</head>

<body>
    <header class="header">
        <a href="../index.html">&lt;</a>
        <p>国内折扣</p>
        <span><img src="../assets/images/header_app.png" alt=""></span>
    </header>

    <div class="container-1">

    </div>
    <!-- 底部结构 、按钮 -->
    <section id="footer">
        <button>更多优惠信息&gt;&gt;</button>
        <div class="brand">
            <span>品牌排行</span>
            <a href="#"><img src="../assets/images/more.png" alt=""></a>
        </div>
    </section>
    <div id="login">
        <div class="container">
            <a href="#">登入</a>
            <a href="#">注册</a>
            <a href="#" class="gotop">返回顶部</a>
        </div>
        <p>手机APP下载 慢点买手机版--掌上比价平台</p>
        <span>m.mandianmai.com</span>
    </div>
</body>

</html>
<script src="../utils/qr.js"></script>

<script>
    // console.log(location.href);
    (function () {
        let container = document.querySelector(".container-1")
        let url = location.href;

        let {
            productid
        } = getUrlParams(url);

        fetch(`http://chst.vip:1234/api/getdiscountproduct?productid=${productid}`)
            .then(body => body.json())
            .then(res => {
                console.log(res);
                let result = res.result[0]
                let html2 = `
                        <b>${result.productImg}</b>
                        <h3>${result.productName}</h3>
                        <span>${result.productInfo}${result.productInfo1}</span>
                        <p>${result.productFrom}|${result.productTime}|${result.productTips}</p>
                        <ul>${result.productCity}</ul>
                        <h4>${result.productComment}</h4>
                    `
                container.innerHTML = html2;
            })

    })()
</script>